<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
    xmlns:fn="http://java.sun.com/jsp/jstl/functions">

    <ui:composition template="/WEB-INF/content/layout.xhtml">
        <ui:define name="title">${msg['menu.server.environment']}</ui:define>
        <ui:define name="content">

<h2>${msg['server.env.http.headers']}</h2>
<table border="1" style="white-space: nowrap;">
<thead><tr><th>${msg['key']}</th><th>${msg['value']}</th></tr></thead>
<tbody>
<c:forEach items="${header}" var="p">
<tr><td>${p.key}</td><td>${fn:escapeXml(p.value)}</td></tr>
</c:forEach>
</tbody>
</table>

<h2>${msg['server.env.http.response']}</h2>
<script>
	$(document).ready(function() {
		var req = new XMLHttpRequest();
		req.open('HEAD', document.location, false);
		req.send(null);
		var headers = req.getAllResponseHeaders();
		$("#response").html(headers);
	});
</script>
<pre id="response">${msg['loading']}</pre>

<h2>${msg['server.env.environment.variables']}</h2>
<table border="1" style="white-space: nowrap;">
<thead><tr><th>${msg['key']}</th><th>${msg['value']}</th></tr></thead>
<tbody>
<c:forEach items="${bean.environment}" var="e">
<tr><td>${e.key}</td><td>${fn:escapeXml(e.value)}</td></tr>
</c:forEach>
</tbody>
</table>

<h2>${msg['server.env.system.properties']}</h2>
<table border="1" style="white-space: nowrap;">
<thead><tr><th>${msg['key']}</th><th>${msg['value']}</th></tr></thead>
<tbody>
<c:forEach items="${bean.properties}" var="p">
<tr><td>${p.key}</td><td>${fn:escapeXml(p.value)}</td></tr>
</c:forEach>
</tbody>
</table>

<h2>${msg['server.env.api.environment']}</h2>
<table border="1" style="white-space: nowrap;">
<thead><tr><th>${msg['key']}</th><th>${msg['value']}</th></tr></thead>
<tbody>
<c:forEach items="${bean.apiEnvironment}" var="p">
<tr><td>${p.key}</td><td>${fn:escapeXml(p.value)}</td></tr>
</c:forEach>
</tbody>
</table>

<h2>${msg['server.env.system.property']}</h2>
<table border="1" style="white-space: nowrap;">
<thead><tr><th>${msg['key']}</th><th>${msg['value']}</th></tr></thead>
<tbody>
<c:forEach items="${bean.systemProperty}" var="p">
<tr><td>${p.key}</td><td>${fn:escapeXml(p.value)}</td></tr>
</c:forEach>
</tbody>
</table>

        </ui:define>
    </ui:composition>

</html>
